POLIBITS, Vol. 57, pp. 67-73, 2018.
Abstract: unit tests, basic path technique, automatic generation of test cases, metaheuristics algorithms
Keywords: Software testing, despite its cost, considerably improves the reliability and quality of systems, contributing to their positioning in the market. Specifically, unit testing is the process by which the correct individual functioning of modules, components, and design is ensured. Even though tools that execute unit testing automatically exist, these lack the ability to provide the developer with support and assistance in the design of test cases; furthermore, the current proposals for test case design in unit testing have not been inserted into the production environment and are unable to generate testing code. The present work proposes a tool that allows developers to automatically generate test cases for unit testing from Java source code. In this new proposal the basis path testing technique is used for the design of the test cases. The control flow graph is automatically generated from the source code being tested, in order to subsequently generate the independent paths. Finally, the combinations of test values that satisfy each and every one of the linearly independent paths are generated. In the process of implementing this new tool a case study was designed for the purpose of validation; metaheuristic algorithms were applied to generate test values and value combinations for each path. These combinations were compared against the ones obtained by other state-of-the-art algorithms. Since in this case study a 100% coverage of the independent paths is reached, the proposed tool exhibits competitive results with respect to the ones reported by tools proposed by other authors.
PDF: GeCaP: Unit Testing Case Generation from Java Source Code
PDF: GeCaP: Unit Testing Case Generation from Java Source Code
https://doi.org/10.17562/PB-57-7
Table of contents of POLIBITS 57